<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML LANG="EN-US">
<HEAD>
<TITLE>VT100.net: VT330/VT340 Programmer Reference Manual</TITLE>
<LINK HREF="vt330.css" TYPE="text/css" REL="stylesheet">
</HEAD>
<BODY>
<DIV CLASS="navbar"><A HREF="http://vt100.net/"><IMG CLASS="button" SRC="vt100.net-logo.png" ALT="VT100.net" HEIGHT="16" WIDTH="102"></A> VT330/VT340 Programmer Reference Manual Volume 2: Graphics Programming<TABLE WIDTH="100%">
<COL SPAN="3" WIDTH="33%">
<TBODY>
<TR>
<TD ALIGN="LEFT"><A HREF="chapter5.html">Chapter 5</A></TD>
<TD ALIGN="CENTER"><A HREF="contents.html">Contents</A></TD>
<TD ALIGN="RIGHT"><A HREF="chapter7.html">Chapter 7</A></TD>
</TR>
</TBODY>
</TABLE>
<HR></DIV>
<H1 ID="S6"><SPAN CLASS="chapnum">6</SPAN> Curve Command</H1>
<P>Curve commands draw circles, arcs, and other curved images. The appearance
of the lines used to draw curves depends on the write control values in effect
when you use the curve command. There are four basic types of curve
commands.</P>
<UL>
<LI>Circles</LI>
<LI>Arcs</LI>
<LI>Curve interpolation sequence</LI>
<LI>Temporary writing controls option</LI>
</UL>
<H2 ID="S6.1">About the Examples</H2>
<P>This chapter includes several examples of figures drawn with curve commands.
These examples use the same initial write control and screen control values as
the examples in <A HREF="chapter5.html">Chapter 5</A>. See "<A HREF="chapter5.html#S5.1">About the Examples</A>" at the beginning
of <A HREF="chapter5.html">Chapter 5</A>.</P>
<H2 ID="S6.2">Circles</H2>
<P>There are two options for drawing circles.</P>
<UL>
<LI><P>Circle with center at current cursor position,<BR>circumference at specified position</P></LI>
<LI><P>Circle with center at specified position,<BR>circumference at current position</P></LI>
</UL>
<P>For both options, the cursor position at the end of the command is the same as
it was at the start. Both options can use the same four types of position arguments
that you use with position (P) and vector (V) commands.</P>
<UL>
<LI>absolute</LI>
<LI>relative</LI>
<LI>absolute/relative</LI>
<LI>pixel vector (PV)</LI>
</UL>
<P>See "<A HREF="chapter4.html#S4.1">Set Position Arguments</A>" in <A HREF="chapter4.html">Chapter 4</A> for a description of these
arguments.</P>
<H3 ID="S6.2.1">Circle with Center at Current Position</H3>
<P>You use the following format to draw a circle with its center at the current
position and circumference at a specified position.</P>
<P CLASS="example">C&lt;position&gt;</P>
<P>where</P>
<DIV CLASS="example"><P><B>C</B> identifies a curve command.</P>
<P><B>&lt;position&gt;</B> is a point on the circumference of the circle.</P></DIV>
<P>You can define a specific point on the circumference. To specify a radius, you
can use a PV value or a single relative position value. To pass through a specific
point, you can use one of the following position values.</P>
<DIV CLASS="example"><TABLE CLASS="padded">
<TBODY>
<TR VALIGN="TOP">
<TD CLASS="first">absolute</TD>
<TD>if that point has specific [X,Y] coordinates</TD>
</TR>
<TR VALIGN="TOP">
<TD CLASS="first">relative</TD>
<TD>if that point has [X,Y] coordinates relative to the current position</TD>
</TR>
<TR VALIGN="TOP">
<TD CLASS="first">absolute/relative</TD>
<TD>if that point has one absolute coordinate and one relative coordinate</TD>
</TR>
<TR VALIGN="TOP">
<TD CLASS="first">pixel vector</TD>
<TD>to specify a radius</TD>
</TR>
</TBODY>
</TABLE></DIV>
<P><A HREF="#F6-1">Figure 6-1</A> shows examples of circles drawn with their center at the current
position. The examples use different types of position arguments.</P>
<TABLE ID="F6-1" CLASS="figure" WIDTH="100%">
<CAPTION>Figure 6-1 Example of Circle with Center at Current Position</CAPTION>
<COL ALIGN="CENTER">
<COL WIDTH="460" ALIGN="RIGHT">
<TBODY>
<TR>
<TD><TABLE CLASS="command-example" FRAME="BORDER" RULES="GROUPS" CELLSPACING="0" CELLPADDING="8">
<TBODY>
<TR>
<TD ALIGN="CENTER">COMMANDS</TD>
</TR>
</TBODY>
<TBODY>
<TR VALIGN="TOP">
<TD>P[200,100]<BR>C[110,110]<BR>P[+450,100]<BR>C[+95]<BR>P[,+250]<BR>C[-75,+50]<BR>P[425,250]<BR>C[480,-80]</TD>
</TR>
</TBODY>
</TABLE></TD>
<TD><IMG SRC="ma-0710-83r.png" ALT=""></TD>
</TR>
<TR>
<TD></TD>
<TD ALIGN="LEFT"><SMALL>NOTE:<BR>Only circles and final cursor would appear on screen.<BR>&nbsp;</SMALL></TD>
</TR>
</TBODY>
</TABLE>
<H3 ID="S6.2.2">Circle with Center at Specified Position</H3>
<P>You use the following format to draw circle with its center at a specified
position and circumference at the current position.</P>
<P CLASS="example">C(C)&lt;position&gt;</P>
<P>where</P>
<DIV CLASS="example"><P><B>(C)</B> identifies the option for a circle with center at the specified position.
This option is in effect until you enter a new command.</P>
<P><B>&lt;position&gt;</B> is the center of the circle. The current position becomes a
point on the circumference of the circle.</P></DIV>
<P>This option uses the same type of position arguments as the option for a circle
with its center at the current position. That is, you can use absolute, relative,
absolute/relative or PV offset values to specify the center point of the circle.
However, the results are different.</P>
<TABLE CLASS="padded">
<TBODY>
<TR VALIGN="TOP">
<TD>current position option</TD>
<TD>Always draws a circle around the current cursor position.</TD>
</TR>
<TR VALIGN="TOP">
<TD>specified position option</TD>
<TD>Draws a circle using the current cursor position as a point on the circumference.</TD>
</TR>
</TBODY>
</TABLE>
<P><A HREF="#F6-2">Figure 6-2</A> shows two circles drawn with their centers at specified positions.
Both circles are the same size and start from the same cursor position.
However, they are drawn in different places, because they have different relative position
arguments.</P>
<P><A HREF="#F6-3">Figure 6-3</A> shows more examples of circles drawn with their center at a specified
position. These examples use different types of position arguments.</P>
<P><A HREF="#F6-4">Figure 6-4</A> shows examples that combine circle with center at specified position
commands with circle with center at current position commands.</P>
<TABLE ID="F6-2" CLASS="figure" WIDTH="100%">
<CAPTION>Figure 6-2 Drawing Circles in Different Directions, Using the Circle with Center at Specified Position</CAPTION>
<COL ALIGN="CENTER">
<COL WIDTH="460" ALIGN="RIGHT">
<TBODY>
<TR>
<TD><TABLE CLASS="command-example" FRAME="BORDER" RULES="GROUPS" CELLSPACING="0" CELLPADDING="8">
<TBODY>
<TR>
<TD ALIGN="CENTER">COMMANDS</TD>
</TR>
</TBODY>
<TBODY>
<TR VALIGN="TOP">
<TD>P[400,240]<BR>C(C)[+150]<BR>C(C)[-150]</TD>
</TR>
</TBODY>
</TABLE></TD>
<TD><IMG SRC="ma-0712-83r.png" ALT=""></TD>
</TR>
<TR>
<TD></TD>
<TD ALIGN="LEFT"><SMALL>NOTE:<BR>
Only circles and cursor would appear on screen<BR>&nbsp;</SMALL></TD>
</TR>
</TBODY>
</TABLE>
<TABLE ID="F6-3" CLASS="figure" WIDTH="100%">
<CAPTION>Figure 6-3 Examples of Circles with Centers at Specified Positions</CAPTION>
<COL ALIGN="CENTER">
<COL WIDTH="460" ALIGN="RIGHT">
<TBODY>
<TR>
<TD><TABLE CLASS="command-example" FRAME="BORDER" RULES="GROUPS" CELLSPACING="0" CELLPADDING="8">
<TBODY>
<TR>
<TD ALIGN="CENTER">COMMANDS</TD>
</TR>
</TBODY>
<TBODY>
<TR VALIGN="TOP">
<TD>P[60,60]<BR>C(C)[+90,+40]<BR>P[200,350]<BR>C(C)[+100]<BR>P[400,200]<BR>C(C)[500,-70]<BR>P[+160,+200]<BR>C(C)[+100,-70]</TD>
</TR>
</TBODY>
</TABLE></TD>
<TD><IMG SRC="ma-0711-83r.png" ALT=""></TD>
</TR>
<TR>
<TD></TD>
<TD ALIGN="LEFT"><SMALL>NOTE:<BR>
Only circles and final cursor would appear on screen<BR>&nbsp;</SMALL></TD>
</TR>
</TBODY>
</TABLE>
<TABLE ID="F6-4" CLASS="figure" WIDTH="100%">
<CAPTION>Figure 6-4 Combining Circle Commands</CAPTION>
<COL ALIGN="CENTER">
<COL WIDTH="460" ALIGN="RIGHT">
<TBODY>
<TR>
<TD><TABLE CLASS="command-example" FRAME="BORDER" RULES="GROUPS" CELLSPACING="0" CELLPADDING="8">
<TBODY>
<TR>
<TD ALIGN="CENTER">COMMANDS</TD>
</TR>
</TBODY>
<TBODY>
<TR VALIGN="TOP">
<TD>P[100,100]<BR>C(C)[+50][+25]<BR>P[300,100]<BR>C[+50][+25]<BR>P[500,100]<BR>C(C)[+50]<BR>C[+25]</TD>
</TR>
</TBODY>
</TABLE></TD>
<TD><IMG SRC="ma-0403-86r.png" ALT=""></TD>
</TR>
</TBODY>
</TABLE>
<H2 ID="S6.3">Arcs</H2>
<P>Arcs are sections of a circle. There are two options for drawing arcs.</P>
<UL>
<LI><P>Arc with center at current position, circumference at specified position</P></LI>
<LI><P>Arc with center at specified position, circumference at current position</P></LI>
</UL>
<P>Both options can use the same four types of position arguments used with circle
options.</P>
<UL>
<LI>absolute</LI>
<LI>relative</LI>
<LI>absolute/relative</LI>
<LI>pixel vector (PV)</LI>
</UL>
<P>The VT300 draws arcs in 1 degree increments. If you specify an arc in increments
other than 1 degree, ReGIS draws to the closest degree. For example, if
you specify an arc of 27.5 degrees, the terminal uses 28 degrees. If you specify
an arc of 27.4 degrees, the terminal uses 27 degrees.</P>
<H3 ID="S6.3.1">Arc with Center at Current Position</H3>
<P>You use the following format for drawing an arc with its center at the current
cursor position and circumference at a specified position. You specify the starting
point for the arc and the number of degrees to draw the arc. ReGIS uses
the current cursor position as the center of the arc's circle. The cursor returns
to this position at the end of this operation.</P>
<P CLASS="example">C(A&lt;degrees&gt;)&lt;position&gt;</P>
<P>where</P>
<DIV CLASS="example"><P><B>A</B> identifies the arc option. This option stays in effect until you enter a
new command.</P>
<P><B>&lt;degrees&gt;</B> are the number of degrees and the direction to draw the arc
in. You indicate the direction with a plus (+) or minus (-) sign. If you use
a + sign or no sign, ReGIS draws the arc counterclockwise from the specified
position. If you use a - sign, ReGIS draws the arc clockwise.</P>
<P><B>&lt;position&gt;</B> is the starting point for the arc. You can use absolute, relative,
absolute/relative, or PV values for the coordinates. You can specify an
X-coordinate, Y-coordinate, or both.</P></DIV>
<P><A HREF="#F6-5">Figure 6-5</A> shows two arcs drawn with the current position option. The figure
shows how positive (+) and negative (-) degree values select the direction of an
arc. <A HREF="#F6-6">Figure 6-6</A> shows some arcs drawn with different types of position
arguments.</P>
<TABLE ID="F6-5" CLASS="figure" WIDTH="100%">
<CAPTION>Figure 6-5 Effect of Signed Degree Value on Arc with Center at Current Position</CAPTION>
<COL ALIGN="CENTER">
<COL WIDTH="460" ALIGN="RIGHT">
<TBODY>
<TR>
<TD><TABLE CLASS="command-example" FRAME="BORDER" RULES="GROUPS" CELLSPACING="0" CELLPADDING="8">
<TBODY>
<TR>
<TD ALIGN="CENTER">COMMANDS</TD>
</TR>
</TBODY>
<TBODY>
<TR VALIGN="TOP">
<TD>P[200,200]<BR>C(A180)[+150]<BR>P[+400]<BR>C(A-180)[+150]</TD>
</TR>
</TBODY>
</TABLE></TD>
<TD><IMG SRC="ma-0713-83r.png" ALT=""></TD>
</TR>
<TR>
<TD></TD>
<TD ALIGN="LEFT"><SMALL>NOTE:<BR>Only arcs and cursor at [600,200] would appear on the screen at end of commands.<BR>&nbsp;</SMALL></TD>
</TR>
</TBODY>
</TABLE>
<TABLE ID="F6-6" CLASS="figure" WIDTH="100%">
<CAPTION>Figure 6-6 Examples of Arcs with Centers at Current Positions, Using Different Types of Position Values</CAPTION>
<COL ALIGN="CENTER">
<COL WIDTH="460" ALIGN="RIGHT">
<TBODY>
<TR>
<TD><TABLE CLASS="command-example" FRAME="BORDER" RULES="GROUPS" CELLSPACING="0" CELLPADDING="8">
<TBODY>
<TR>
<TD ALIGN="CENTER">COMMANDS</TD>
</TR>
</TBODY>
<TBODY>
<TR VALIGN="TOP">
<TD>P[150,150]<BR>C(A-60)[50,100]<BR>P[+50,+50]<BR>C(A-270)[,+150]<BR>P[600,+100]<BR>C(A180)[700,+100]</TD>
</TR>
</TBODY>
</TABLE></TD>
<TD><IMG SRC="ma-0714-83r.png" ALT=""></TD>
</TR>
<TR>
<TD></TD>
<TD ALIGN="LEFT"><SMALL>NOTE:<BR>Only arcs and cursor at [600,300] would appear on the screen at end of commands.<BR>&nbsp;</SMALL></TD>
</TR>
</TBODY>
</TABLE>
<H3 ID="S6.3.2">Arc with Center at Specified Position</H3>
<P>You can use this option to link the end of one arc to the beginning of another.</P>
<P>This option draws an arc from the current cursor position. You specify the center
of the arc's circle. The cursor position moves with the arc. At the end of
the option, the cursor is at the end of the arc. You use the following format for
drawing an arc with its center at a specified position.</P>
<P CLASS="example">C(A&lt;degrees&gt;C)&lt;position&gt;</P>
<P>where</P>
<DIV CLASS="example"><P><B>A</B> identifies an arc option. This option stays in effect until you enter a new
command.</P>
<P><B>&lt;degrees&gt;</B> are the number of degrees and direction to draw the arc in.
You select the direction with a plus (+) or minus (-) sign. If you use a +
sign or no sign, ReGIS draws the arc counterclockwise from the specified
position. If you use a - sign, ReGIS draws the arc clockwise.</P>
<P>The second <B>C</B> identifies the arc with center at specified position option.</P>
<P><B>&lt;position&gt;</B> is the center of the arc. You can use absolute, relative,
absolute/relative, or PV values. You can specify an X-coordinate, Y-coordinate, or both.</P></DIV>
<P>When you draw arcs that are not on a 10 degree boundary, the end of an arc
and the cursor position may not be where you expect. There are three ways
you can make sure of the cursor position.</P>
<UL>
<LI>Move the cursor to an absolute position.</LI>
<LI>Use the position report (<A HREF="chapter10.html">Chapter 10</A>).</LI>
<LI>Draw a vector to where you want the cursor to stop.</LI>
</UL>
<P>You should use these methods occasionally when you draw arcs of other than
10 degree increments.</P>
<P><A HREF="#F6-7">Figure 6-7</A> shows two arcs drawn with the specific position option. The figure
shows how positive (+) and negative (-) degree values select the direction of an
arc. <A HREF="#F6-8">Figure 6-8</A> shows some arcs drawn with different types of position values.
The figure also shows an example of how to link arcs together.</P>
<TABLE ID="F6-7" CLASS="figure" WIDTH="100%">
<CAPTION>Figure 6-7 Effect of a Signed Degree Value on an Arc with Center at Specified Position</CAPTION>
<COL ALIGN="CENTER">
<COL WIDTH="460" ALIGN="RIGHT">
<TBODY>
<TR>
<TD><TABLE CLASS="command-example" FRAME="BORDER" RULES="GROUPS" CELLSPACING="0" CELLPADDING="8">
<TBODY>
<TR>
<TD ALIGN="CENTER">COMMANDS</TD>
</TR>
</TBODY>
<TBODY>
<TR VALIGN="TOP">
<TD>P[350,200]<BR>C(A180C)[-150]<BR>P[+700]<BR>C(A-180C)[-150]</TD>
</TR>
</TBODY>
</TABLE></TD>
<TD><IMG SRC="ma-0715-83r.png" ALT=""></TD>
</TR>
<TR>
<TD></TD>
<TD ALIGN="LEFT"><SMALL>NOTE:<BR>Only arcs and cursor at [450,200] would appear on the screen at end of commands.<BR>&nbsp;</SMALL></TD>
</TR>
</TBODY>
</TABLE>
<TABLE ID="F6-8" CLASS="figure" WIDTH="100%">
<CAPTION>Figure 6-8 Using Different Types of Position Values for Arcs with Centers at Specified Positions</CAPTION>
<COL ALIGN="CENTER">
<COL WIDTH="460" ALIGN="RIGHT">
<TBODY>
<TR>
<TD><TABLE CLASS="command-example" FRAME="BORDER" RULES="GROUPS" CELLSPACING="0" CELLPADDING="8">
<TBODY>
<TR>
<TD ALIGN="CENTER">COMMANDS</TD>
</TR>
</TBODY>
<TBODY>
<TR VALIGN="TOP">
<TD>P[50,100]<BR>C(A-60C)[150,150]<BR>(A135C)[+160,150]<BR>(A-90C)[+250,+150]</TD>
</TR>
</TBODY>
</TABLE></TD>
<TD><IMG SRC="ma-0716-83r.png" ALT=""></TD>
</TR>
<TR>
<TD></TD>
<TD ALIGN="LEFT"><SMALL>NOTE:<BR>Only arcs and cursor at end of last arc would appear on the screen at end of commands.<BR>&nbsp;</SMALL></TD>
</TR>
</TBODY>
</TABLE>
<H2 ID="S6.4">Curve Interpolation</H2>
<P>You can draw a curve by specifying four or more positions on the curve. ReGIS
draws the curve by estimating where the other positions on the curve should
fall. This method is called <DFN>curve interpolation</DFN>.</P>
<P>You specify the positions in one of the following sequences.</P>
<UL>
<LI>Closed curve sequence</LI>
<LI>Open curve sequence</LI>
</UL>
<P>The closed curve sequence uses the same format as the bounded position stack
options for position and vector commands. The open curve sequence uses the
same format as the unbounded position stack options for position and vector
commands. You can use a null position argument with closed and open curve
sequences.</P>
<H3 ID="S6.4.1">How ReGIS Interpolates Curves</H3>
<P>You may use a certain equation that draws curves, but ReGIS may or may not
use the same equation you use. However, ReGIS does draw the curve through
each point that you specify. You must use at least four positions to ensure that
ReGIS draws a curve close to the equation you use. One of these positions is
the cursor position at the start of the sequence.</P>
<P>ReGIS draws curves according to the following guidelines.</P>
<UL>
<LI><P>The curve passes through each point you specify.</P></LI>
<LI><P>The curve has exactly the same shape, regardless if it is drawn from
the first point to the last, or from the last to the first.</P></LI>
<LI><P>The slope of the curve at a given point is parallel to a line drawn
through two other points on each side of the given point.</P></LI>
</UL>
<P>ReGIS uses four specified positions at a time to draw a section of the curve.
After using the first four positions, ReGIS moves to the next position. Then
ReGIS uses that position and the previous three positions to draw the next
section of the curve. This action continues until ReGIS uses all the positions
you specified.</P>
<P>Remember that the positions you select define the curve. If you use positions
that are too far apart, the curve on the screen may not reflect the function you
are trying to represent.</P>
<H3 ID="S6.4.2">Closed Curve Sequence</H3>
<P>This option lets you draw a closed curve by specifying points on the curve. At
the end of the sequence, the cursor is at the position where it started the sequence.
You use the following format for the closed curve sequence.</P>
<P CLASS="example">C(B)&lt;positions&gt;(E)</P>
<P>where</P>
<DIV CLASS="example"><P><B>(B)</B> indicates the start of the closed curve sequence.</P>
<P><B>&lt;positions&gt;</B> are a minimum of two positions on the curve. ReGIS uses
these positions to interpolate the rest of the curve. You can use absolute,
relative, absolute/relative, or PV values. You can specify an X-coordinate,
Y-coordinate, or both.</P>
<P><B>(E)</B> indicates the end of the closed curve sequence.</P></DIV>
<P>Closed curve sequences use a format similar to the bounded position stack options
for position and vector commands. However, you can only use one pair of
(B) and end (E) options in closed curve sequences. You can use 16 pairs of (B)
and (E) options in bounded position stacks for position and vector commands.</P>
<P>When you use relative values (including PV values), the value is relative to the
last specified cursor position. For example, the first specified value is relative
to the cursor position at the start of the sequence; the second specified value is
relative to the first specified value, and so on.</P>
<P>You can use a [] null position argument to repeat the previous cursor position.
Remember that the null position is the same as the [+0,+0] position. There
are two reasons to use the [] null position argument in a closed curve sequence.</P>
<UL>
<LI><P><STRONG>Close the curve with a smoother line.</STRONG><BR>
You include the [] argument at the start and end of the sequence. ReGIS repeats the cursor
position at the start of the sequence, and the last position you specified.</P></LI>
<LI><P><STRONG>Create a sharper change in the interpolated curve form.</STRONG><BR>
You use the [] argument during the sequence. ReGIS repeats the position specified before
the [] argument.</P></LI>
</UL>
<P><A HREF="#F6-9">Figure 6-9</A> shows a closed curve drawn with a null position argument at the
start and end of the sequence. <A HREF="#F6-10">Figure 6-10</A> shows a closed curve drawn without
the [] argument.</P>
<TABLE ID="F6-9" CLASS="figure" WIDTH="100%">
<CAPTION>Figure 6-9 Closed Curve Sequence with Null Position Argument</CAPTION>
<COL ALIGN="CENTER">
<COL ALIGN="RIGHT">
<TBODY>
<TR>
<TD><TABLE CLASS="command-example" FRAME="BORDER" RULES="GROUPS" CELLSPACING="0" CELLPADDING="8">
<TBODY>
<TR>
<TD ALIGN="CENTER">COMMANDS</TD>
</TR>
</TBODY>
<TBODY>
<TR VALIGN="TOP">
<TD>P[100,100]<BR>C(B)<BR>[]<BR>[75,125]<BR>[150,200]<BR>[225,125]<BR>[300,200]<BR>[375,125]<BR>[450,200]<BR>[525,125]<BR>[]<BR>(E)</TD>
</TR>
</TBODY>
</TABLE></TD>
<TD><IMG SRC="ma-0718-83.png" ALT=""></TD>
</TR>
</TBODY>
</TABLE>
<TABLE ID="F6-10" CLASS="figure" WIDTH="100%">
<CAPTION>Figure 6-10 Closed Curve Sequence Without Null Position Argument</CAPTION>
<COL ALIGN="CENTER">
<COL ALIGN="RIGHT">
<TBODY>
<TR>
<TD><TABLE CLASS="command-example" FRAME="BORDER" RULES="GROUPS" CELLSPACING="0" CELLPADDING="8">
<TBODY>
<TR>
<TD ALIGN="CENTER">COMMANDS</TD>
</TR>
</TBODY>
<TBODY>
<TR VALIGN="TOP">
<TD>P[230,240]<BR>C(B)<BR>[320,160]<BR>[480,120]<BR>[570,160]<BR>[480,240]<BR>[320,280]<BR>(E)</TD>
</TR>
</TBODY>
</TABLE></TD>
<TD><IMG SRC="ma-0717-83.png" ALT=""></TD>
</TR>
</TBODY>
</TABLE>
<H3 ID="S6.4.3">Open Curve Sequence</H3>
<P>This option lets you draw an open curve by specifying points on the curve. At
the end of the sequence, the cursor is at the last position you specified. You
use the following format for the open curve sequence.</P>
<P CLASS="example">C(S)&lt;positions&gt;(E)</P>
<P>where</P>
<DIV CLASS="example"><P><B>(S)</B> indicates the start of an open curve sequence.</P>
<P><B>&lt;positions&gt;</B> are a minimum of three positions on the curve. ReGIS uses
these positions to interpolate the rest of the curve. You can use absolute,
relative, absolute/relative, or PV values. You can specify an X-coordinate,
Y-coordinate, or both.</P>
<P><B>(E)</B> indicates the end of the open curve sequence.</P></DIV>
<P>Open curve sequences use a format similar to the unbounded position stack
options for position and vector commands. However, you can only use one pair
of (S) and (E) options in open curve sequences. You can use 16 pairs of (S)
and (E) options in unbounded position stacks for position and vector
commands.</P>
<P>You can use a [] null position argument to repeat the previous cursor position.
There are two reasons to use the [] null position argument in an open curve
sequence.</P>
<UL>
<LI><P><STRONG>To draw the curve completely to both ends.</STRONG><BR>
You use the [] argument at the beginning and end of the sequence.
This causes ReGIS to draw the curve through two more positions.</P>
<UL>
<LI>the cursor position before the (S) option</LI>
<LI>the last position you specified</LI>
</UL>
<P>Without the [] argument, ReGIS only draws the curve from the first
specified position to the next-to-last position. The [] argument duplicates
the first and last positions, extending the drawing of the curve
through those positions. The last two and first two positions control
the direction of the curve, but ReGIS does not connect them.</P></LI>
<LI><P><STRONG>Create a sharper change in the interpolated curve form.</STRONG><BR>
You use the [] argument during the sequence. ReGIS repeats the position specified
before the [] argument.</P></LI>
</UL>
<P><A HREF="#F6-11">Figure 6-11</A> shows an open curve drawn without null position arguments.
<A HREF="#F6-12">Figure 6-12</A> shows the same curve drawn with null position arguments at the
beginning and end of the sequence.</P>
<TABLE ID="F6-11" CLASS="figure" WIDTH="100%">
<CAPTION>Figure 6-11 Open Curve Sequence Without Null Position Arguments</CAPTION>
<COL ALIGN="CENTER">
<COL ALIGN="RIGHT">
<TBODY>
<TR>
<TD><TABLE CLASS="command-example" FRAME="BORDER" RULES="GROUPS" CELLSPACING="0" CELLPADDING="8">
<TBODY>
<TR>
<TD ALIGN="CENTER">COMMANDS</TD>
</TR>
</TBODY>
<TBODY>
<TR VALIGN="TOP">
<TD>P[75,125]<BR>C(S)<BR>[150,200]<BR>[225,125]<BR>[300,200]<BR>[375,125]<BR>[450,200]<BR>[525,125]<BR>(E)</TD>
</TR>
</TBODY>
</TABLE></TD>
<TD><IMG SRC="ma-0719-83.png" ALT=""></TD>
</TR>
</TBODY>
</TABLE>
<TABLE ID="F6-12" CLASS="figure" WIDTH="100%">
<CAPTION>Figure 6-12 Open Curve Sequence With Null Position Arguments</CAPTION>
<COL ALIGN="CENTER">
<COL ALIGN="RIGHT">
<TBODY>
<TR>
<TD><TABLE CLASS="command-example" FRAME="BORDER" RULES="GROUPS" CELLSPACING="0" CELLPADDING="8">
<TBODY>
<TR>
<TD ALIGN="CENTER">COMMANDS</TD>
</TR>
</TBODY>
<TBODY>
<TR VALIGN="TOP">
<TD>P[75,125]<BR>C(S)<BR>[]<BR>[150,200]<BR>[225,125]<BR>[300,200]<BR>[375,125]<BR>[450,200]<BR>[525,125]<BR>[]<BR>(E)</TD>
</TR>
</TBODY>
</TABLE></TD>
<TD><IMG SRC="ma-0720-83.png" ALT=""></TD>
</TR>
</TBODY>
</TABLE>
<H2 ID="S6.5">Temporary Write Control</H2>
<P>The write control options in <A HREF="chapter3.html">Chapter 3</A> control the appearance of the images
you draw. For example, these options control the shade/color of images. When
you use curve commands, ReGIS uses the current settings for the write control
options.</P>
<P>You can use a temporary write control option to temporarily change one or
more of these settings for a curve command. The temporary values remain in
effect until you use one of the following commands.</P>
<UL>
<LI><P>another temporary write control option</P></LI>
<LI><P>any command that begins with a command key letter, such as a vector (V) command
or another curve (C) command</P></LI>
</UL>
<P>When you use one of the above commands, the writing control options return
to their previous values.</P>
<P>You include the temporary write control option in your curve command. You
can use any write control option from <A HREF="chapter3.html">Chapter 3</A>.</P>
<UL>
<LI>PV multiplication</LI>
<LI>Pattern control</LI>
<LI>Foreground intensity</LI>
<LI>Plane select control</LI>
<LI>Overlay writing</LI>
<LI>Replace writing</LI>
<LI>Complement writing</LI>
<LI>Erase writing</LI>
<LI>Negative pattern control</LI>
</UL>
<P CLASS="note">NOTE: The W option is not recommended for drawing curves. The results are
unpredictable.</P>
<P>You use the following format for a temporary write control option.</P>
<P CLASS="example">C(W(&lt;suboptions&gt;))&lt;arguments&gt;</P>
<P>where</P>
<DIV CLASS="example"><P><B>W</B> identifies a temporary write control option.</P>
<P><B>&lt;suboptions&gt;</B> are the temporary write control values to use.</P>
<P><B>&lt;arguments&gt;</B> are the curve command arguments that will use the temporary
write control values.</P></DIV>
<P><A HREF="#F6-13">Figure 6-13</A> shows a simple graph that uses temporary write control options to
change the pattern of open curve sequences. For more complex examples, see
"<A HREF="chapter3.html#S3.7">Shading Control</A>" in <A HREF="chapter3.html">Chapter 3</A>.</P>
<TABLE ID="F6-13" CLASS="figure" WIDTH="100%">
<CAPTION>Figure 6-13 Example of Temporary Write Control</CAPTION>
<COL ALIGN="CENTER">
<TBODY>
<TR>
<TD><IMG SRC="ma-0721-83.png" ALT=""></TD>
</TR>
<TR>
<TD><TABLE CLASS="command-example" FRAME="BORDER" RULES="GROUPS" CELLSPACING="0" CELLPADDING="8">
<TBODY>
<TR>
<TD ALIGN="CENTER">COMMANDS</TD>
</TR>
</TBODY>
<TBODY>
<TR VALIGN="TOP">
<TD>P[100,100]<BR>V[,+300]<BR>[+400]<BR>P[100,-80]<BR>C(W(P2))<BR>(S)<BR>[]<BR>
[+100,-30]<BR>[+100,-50]<BR>[+100,-30]<BR>[+100,-20]<BR>[]<BR>(E)<BR>P[100,300]<BR>
C(W(P4))<BR>(S)<BR>[]<BR>[+100]<BR>[+100,-40]<BR>[+100,-20]<BR>[+100,-40][]<BR>(E)</TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
</TBODY>
</TABLE>
<H2 ID="S6.6">Curve Command Summary</H2>
<P><A HREF="#T6-1">Table 6-1</A> is a summary of <B>C</B> command options, including any default values.</P>
<TABLE ID="T6-1" CLASS="summarytable" FRAME="VOID" RULES="GROUPS" CELLSPACING="0" CELLPADDING="4">
<CAPTION>Table 6-1 Curve Command Summary</CAPTION>
<COL WIDTH="35%">
<COL WIDTH="15%">
<COL WIDTH="50%">
<THEAD>
<TR VALIGN="BOTTOM">
<TH>Option*</TH>
<TH>Default</TH>
<TH>Description</TH>
</TR>
</THEAD>
<TFOOT>
<TR>
<TD COLSPAN="3">* All [X,Y] coordinates can be absolute, relative, or absolute/relative values.</TD>
</TR>
</TFOOT>
<TBODY>
<TR VALIGN="TOP">
<TD>[X,Y]</TD>
<TD>None</TD>
<TD><P><STRONG>Circle with center at current position</STRONG><BR>
[X,Y] defines a point on the circumference of the circle.</P></TD>
</TR>
<TR VALIGN="TOP">
<TD>(C)[X,Y]</TD>
<TD>None</TD>
<TD><P><STRONG>Circle with center at specified position</STRONG><BR>
[X,Y] defines the center of the circle. The current active position defines a
point on the circumference.</P></TD>
</TR>
<TR VALIGN="TOP">
<TD>(A&lt;degrees&gt;)[X,Y]</TD>
<TD>360</TD>
<TD><P><STRONG>Arc with center at current position</STRONG><BR>
[X,Y] defines the starting point for an arc.</P>
<P>&lt;degrees&gt; is a signed value the determines the size and direction of arc.</P>
<P>+ = counterclockwise&lt;<BR>- = clockwise</P></TD>
</TR>
<TR VALIGN="TOP">
<TD>(A&lt;degrees&gt;C)[X,Y]</TD>
<TD>360</TD>
<TD><P><STRONG>Arc with center at specified position</STRONG><BR>
[X,Y] defines the arc's center. The starting point for the arc is the current active position.</P>
<P>&lt;degrees&gt; is a signed value the determines the size and direction of arc.</P>
<P>+ = counterclockwise<BR>- = clockwise</P></TD>
</TR>
<TR VALIGN="TOP">
<TD>(B)&lt;positions&gt;(E)</TD>
<TD>None</TD>
<TD><P><STRONG>Closed curve sequence</STRONG><BR>
Defines a closed curve based on [X,Y] positions specified in the sequence.</P></TD>
</TR>
<TR VALIGN="TOP">
<TD>(S)&lt;positions&gt;(E)</TD>
<TD>None</TD>
<TD><P><STRONG>Open curve sequence</STRONG><BR>
Defines an open curve based on [X,Y] positions specified in the sequence.</P></TD>
</TR>
<TR VALIGN="TOP">
<TD>(W(&lt;suboptions&gt;))</TD>
<TD>None</TD>
<TD><P><STRONG>Temporary write control</STRONG><BR>
Lets you use temporary write control values with one curve command. Temporary values only
remain in effect for the selected command, but that command can include several curves.</P></TD>
</TR>
</TBODY>
</TABLE>
<DIV CLASS="navbar"><HR>
<TABLE WIDTH="100%">
<COL SPAN="3" WIDTH="33%">
<TBODY>
<TR>
<TD ALIGN="LEFT"><A HREF="chapter5.html">Chapter 5</A></TD>
<TD ALIGN="CENTER"><A HREF="contents.html">Contents</A></TD>
<TD ALIGN="RIGHT"><A HREF="chapter7.html">Chapter 7</A></TD>
</TR>
</TBODY>
</TABLE>
<DIV CLASS="navbot">http://vt100.net/docs/vt3xx-gp/chapter6.html</DIV></DIV>
</BODY>
</HTML>
